package com.up.upzl.biz.domain;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;

import com.up.upzl.base.domain.BaseDomain;

import lombok.Getter;
import lombok.Setter;

/**
 * 模块管理
 * 
 * @author youke
 *
 */
@Getter
@Setter
@Entity
public class Module extends BaseDomain {

	private static final long serialVersionUID = -1232596024200981606L;

	/**
	 * 模块名称
	 */
	@Column(length = 64)
	private String name;

	/**
	 * 展示类型
	 */
	private ShowType showType;

	public enum ShowType {
		轮播, 广告, 自定义
	}

	/**
	 * 所属类型
	 */
	private PageType pageType;

	public enum PageType {
		首页, 社区
	}

	/**
	 * 模块详情表
	 */
	@OneToMany(mappedBy = "module", fetch = FetchType.LAZY)
	private List<ModuleArticle> moduleArticles;

	/**
	 * 排序
	 */
	private Long sort;
}
